home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Questions & Answers / Q&A Programming Functions / Programming merge rhythms < prev    next >
Encoding:
Text File  |  1998-10-26  |  820 b   |  24 lines  |  [TEXT/ScoM]

  1. PROGRAMMING MERGE-RHYTHMS
  2.  
  3. >I think I have allmost solved the merge-rhythms function.
  4. >It's the most complicated function I have written and when its done I 
  5. >will try to
  6. >add also melodys.
  7. >It is really difficult because first I have to convert rhythms to a 
  8. >(real-time) scale
  9. >then appending then remove-duplicates and sort before converting back 
  10. >again.
  11.  
  12. Reminds me the solution I used in symbol harmonization which is
  13. length sensitive. First it expand-with-len and then filters and then
  14. compresses it back.
  15.  
  16. expand-with-len '(a b c d) '(1/16. 1/8) '1/1 '1/32)
  17. --> (a a a b b b b c c c d d d d a a a b b b b c c c d d d d a a a b b b b)
  18.  
  19. (compress-with-len '(a a a b b b b c c c d d d d a a a b b b b c c c d d d d a a a b b b b)
  20.                    '(1/16. 1/8)
  21.                    '1/32)
  22. --> (a b c d a b c d a b)
  23.  
  24.